﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;

public class Player_Online_Text : NetworkBehaviour
{
    public override void OnStartLocalPlayer()
    {
        Camera.main.transform.SetParent(transform);
        Camera.main.transform.localPosition = Vector3.zero;
        base.OnStartLocalPlayer();
    }
    private void Update()
    {
        if (!isLocalPlayer) return;

        var moveX = Input.GetAxis("Horizontal") * Time.deltaTime * 110f;
        var moveZ = Input.GetAxis("Vertical") * Time.deltaTime * 4.0f;

        transform.Rotate(0, moveX, 0);
        transform.Translate(0, 0, moveZ);
    }
}
